using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class StationDailySumMap : EntityTypeConfiguration<StationDailySum>
	{
		public StationDailySumMap()
		{
			// Primary Key
			this.HasKey(t => t.ID);

			// Properties
			this.Property(t => t.DeliverSuccRate)
				.HasMaxLength(20);
				
			this.Property(t => t.ResortRate)
				.HasMaxLength(20);
				
			this.Property(t => t.Remark)
				.HasMaxLength(1024);
				
			// Table & Column Mappings
			this.ToTable("StationDailySum");
			this.Property(t => t.ID).HasColumnName("ID");
			this.Property(t => t.DayReceiveOrderCount).HasColumnName("DayReceiveOrderCount");
			this.Property(t => t.DayReceiveNeedInSum).HasColumnName("DayReceiveNeedInSum");
			this.Property(t => t.DayReceiveNeedOutSum).HasColumnName("DayReceiveNeedOutSum");
			this.Property(t => t.DayReceiveGoodsCount).HasColumnName("DayReceiveGoodsCount");
			this.Property(t => t.DayOutOrderCount).HasColumnName("DayOutOrderCount");
			this.Property(t => t.PreDayResortCount).HasColumnName("PreDayResortCount");
			this.Property(t => t.PreDayResortNeedInSum).HasColumnName("PreDayResortNeedInSum");
			this.Property(t => t.PreDayResortNeedOutSum).HasColumnName("PreDayResortNeedOutSum");
			this.Property(t => t.DayTransferOrderCount).HasColumnName("DayTransferOrderCount");
			this.Property(t => t.DayInStationNeedInSum).HasColumnName("DayInStationNeedInSum");
			this.Property(t => t.DayInStationNeedOutSum).HasColumnName("DayInStationNeedOutSum");
			this.Property(t => t.DayNeedDeliverOrderCount).HasColumnName("DayNeedDeliverOrderCount");
			this.Property(t => t.DayNeedDeliverInSum).HasColumnName("DayNeedDeliverInSum");
			this.Property(t => t.DayNeedDeliverOutSum).HasColumnName("DayNeedDeliverOutSum");
			this.Property(t => t.CashSuccOrderCount).HasColumnName("CashSuccOrderCount");
			this.Property(t => t.CashRealInSum).HasColumnName("CashRealInSum");
			this.Property(t => t.CashRealOutSum).HasColumnName("CashRealOutSum");
			this.Property(t => t.PosSuccOrderCount).HasColumnName("PosSuccOrderCount");
			this.Property(t => t.PosRealInSum).HasColumnName("PosRealInSum");
			this.Property(t => t.DeliverSuccRate).HasColumnName("DeliverSuccRate");
			this.Property(t => t.RejectOrderCount).HasColumnName("RejectOrderCount");
			this.Property(t => t.AllRejectNeedInSum).HasColumnName("AllRejectNeedInSum");
			this.Property(t => t.AllRejectNeedOutSum).HasColumnName("AllRejectNeedOutSum");
			this.Property(t => t.DayResortCount).HasColumnName("DayResortCount");
			this.Property(t => t.DayResortNeedInSum).HasColumnName("DayResortNeedInSum");
			this.Property(t => t.DayResortNeedOutSum).HasColumnName("DayResortNeedOutSum");
			this.Property(t => t.DayOutStationOrderCount).HasColumnName("DayOutStationOrderCount");
			this.Property(t => t.DayOutStationNeedInSum).HasColumnName("DayOutStationNeedInSum");
			this.Property(t => t.DayOutStationNeedOutSum).HasColumnName("DayOutStationNeedOutSum");
			this.Property(t => t.ResortRate).HasColumnName("ResortRate");
			this.Property(t => t.StationID).HasColumnName("StationID");
			this.Property(t => t.DailyTime).HasColumnName("DailyTime");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.FinanceStatus).HasColumnName("FinanceStatus");
			this.Property(t => t.RealInCome).HasColumnName("RealInCome");
			this.Property(t => t.POSChecked).HasColumnName("POSChecked");
			this.Property(t => t.Remark).HasColumnName("Remark");
			this.Property(t => t.DayOutOrderSum).HasColumnName("DayOutOrderSum");
		}
	}
}

